import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "Certeasy 证书自动化文档",
  description: "A VitePress Site",
  titleTemplate: 'Certeasy证书自动化',
  head: [
    ['script', {}, `;(function(c,l,a,r,i,t,y){
        c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
        t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
        y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
    })(window, document, "clarity", "script", "ojg5kx68yt");`],
    ['script', {
      async: 'async',
      src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1093958243894389',
      crossorigin: 'anonymous',
    }]
  ],
  themeConfig: {
    siteTitle: '文档',
    logo: '/certeasy-logo.png', // 表示public/avartar.png
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: '定制开发', link: '/custom-make' },
      { text: '常见问题', link: '/faq' },
      { text: 'Certeasy', link: 'https://www.certeasy.cn' },
      { text: '控制台', link: 'https://app.certeasy.cn' },
    ],
    search: {
      provider: 'local'
    },

    footer: {
      message: '一站式证书服务 · 自动签发 · 自动部署 · 到期监控',
      copyright: '© 2024-present Certeasy.cn'
    },

    outline: {
      label: '目录'
    },

    sidebar: [
      {
        text: '指南',
        base: '/guide',
        items: [
          { text: '快速上手', link: '/quick-start' },
        ]
      },
      {
        text: 'DNS授权',
        base: '/dns',
        collapsed: false,
        items: [
          {
            text: '阿里云',
            link: '/aliyun',
          },
          {
            text: '腾讯云',
            link: '/qcloud',
          }
        ]
      },
      {
        text: '云资源部署',
        items: [
          {
            text: '阿里云',
            base: '/cloud/aliyun',
            collapsed: true,
            items: [
              { text: 'SSL(云盾证书)', link: '/ssl' },
              { text: 'CDN', link: '/cdn' },
              { text: 'DCDN（全站加速）', link: '/dcdn' },
              { text: 'OSS', link: '/oss' },
            ]
          },
          {
            text: '腾讯云',
            base: '/cloud/qcloud',
            collapsed: true,
            items: [
              { text: 'SSL', link: '/ssl' },
              { text: 'CDN', link: '/cdn' },
              { text: 'ECDN（全站加速）', link: '/ecdn' },
            ]
          },
          {
            text: '七牛云',
            base: '/cloud/qiniu', 
            collapsed: true,
            items: [
              { text: 'SSL', link: '/ssl' },
              { text: 'CDN', link: '/cdn' },
            ]
          },
          {
            text: '宝塔面板', 
            base: '/cloud/bt', 
            collapsed: true,
            items: [
              { text: '站点SSL', link: '/web' },
              { text: '面板SSL', link: '/panel' },
            ]
          },
          {
            text: 'Webhook', 
            link: '/cloud/webhook', 
          },
        ]
      },
      {
        text: '服务',
        items: [
          { text: '常见问题', link: '/faq' },
          { text: '服务协议', link: '/terms' },
          { text: '隐私声明', link: '/privacy' },
        ]
      }
    ],

    socialLinks: [
      // { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
    ]
  }
})
